package com.tangpian.sna.core.dao.mongodb;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

import com.tangpian.sna.core.dao.ItemDao;
import com.tangpian.sna.core.model.Item;

@Repository
public class ItemMongodbDao<T extends Item> implements ItemDao<T> {
	
	@Autowired
	private MongoTemplate mongoTemplate;


	@Override
	public <S extends T> Iterable<S> save(Iterable<S> arg0) {
		for (S s : arg0) {
			mongoTemplate.save(s);
		}
		
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<T> findByKeyword(String keyword) {
		// TODO Auto-generated method stub
		return null;
	}
	
}
